home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14105 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: newsie.dmc.com!usenet
  2. From: prozac@cape.com (gregg jennings)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: ANSI C and Posix (was Re: C++  knocks crap out of Ada)
  5. Date: 11 Apr 1996 22:23:17 GMT
  6. Organization: Colossal Congress of Stuff & Things
  7. Message-ID: <4kk0ol$9jt@newsie.dmc.com>
  8. NNTP-Posting-Host: tsa_34.cape.com
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=US-ASCII
  11. X-Newsreader: WinVN 0.99.6
  12.  
  13. In article <4kdlgm$10f@solutions.solon.com> seebs@solutions.solon.com
  14. (Peter Seebach) writes:
  15.  
  16. >In article <dewar.829011320@schonberg>, Robert Dewar <dewar@cs.nyu.edu> 
  17. wrote:
  18.  
  19. >>Here is the exact case. We declare a buffer of 100 bytes. We read a
  20. >>1000 bytes from a file whose total length is 68 bytes. On all systems
  21. >>that we had experience with other than Linux, this worked fine, the
  22. >>first 68 bytes of the buffer is filled, and the remaining 32 bytes
  23. >>is unused.
  24.  
  25. >Why are you reading 1000 bytes if you *know* there aren't that many?
  26.  
  27. Perhaps it is to leave a security hole in his program.  I.e. after
  28. the program is implemented, he changes that 68 byte file by appending
  29. some opcodes that will, when read and overwrites the too-small buffer,
  30. will replace the stack return address and then go off an execute some
  31. really cool worm type code which will then go on to effect and take
  32. down the entire Internet!
  33.  
  34.  
  35.